package com.finer.remote.warehouse;

import com.finer.dto.warehouse.GoodsPageDTO;
import com.finer.entity.ResponseMessage;
import com.finer.entity.document.FinerGoods;
import org.springframework.web.bind.annotation.*;

/**
 * @author wangenhao
 * @interfaceName FinerGoodsRemote
 * @description 商品remote接口
 * @date 2024-10-21 下午2:33
 */
@RestController
@RequestMapping("/goods")
@CrossOrigin
public interface FinerGoodsRemote {

    @RequestMapping("/page")
    ResponseMessage getGoodsPage(GoodsPageDTO goodsPageDTO);

    @RequestMapping("/add")
    ResponseMessage addGoods(@RequestBody FinerGoods finerGoods);

    @RequestMapping("/{id}")
    ResponseMessage getGoodsById(@PathVariable("id") Integer id);

    @RequestMapping("/update")
    ResponseMessage updateGoods(@RequestBody FinerGoods finerGoods);

    @RequestMapping("/delete")
    ResponseMessage deleteGoods(Integer id);
}
